package com.electricaalberti.controllers;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.Scanner;

import com.electricaalberti.entitats.Articles;

public class InsertArticulos {
	
	public void introduir(Connection conexion, Articles art){
		
		Statement st = null;
		try{
			
			st = conexion.createStatement();
			st.executeUpdate("INSERT INTO ARTICLE VALUES('"+art.getCodiArticle()+"','"+art.getDescripcio()+"',"+art.getPreuCost()+","+art.getPreuVenta()+",'"+art.getCodiMarca()+"','"+art.getCodiFamilia()+"')");
			
		}catch (SQLException e){
			System.out.println("Error al mostrar los datos "+e.toString());
		}
		
	}

}
